import { Action } from '@ngrx/store';

import { Folding } from '../../models';

export enum FoldingActionTypes {
    SET_BASEMAPS = '[Basemaps] Set Basemaps',
    SET_BASEMAPS_THUMBNAIL = '[Basemaps] Set Basemaps Thumbnail',
    SET_LAYERS = '[Layers] Set Layers',
    SET_SPATICL_FILTERING = '[Spaticl Filtering] Set Spaticl Filtering',
    SET_MEASURE = '[Measure] Set Measure',
    SET_GRID = '[Grid] Set Grid',
    SET_RESOURCE_TREE = '[Resource Tree] Set Resource Tree',
    SET_UPLOAD = '[Upload] Set Upload!'
};

export class SetBasemaps implements Action {
    readonly type = FoldingActionTypes.SET_BASEMAPS;
    constructor(public payload: Folding) {}
}

export class SetBasemapsThumbnail implements Action {
    readonly type = FoldingActionTypes.SET_BASEMAPS_THUMBNAIL;
    constructor(public payload: string) {}
}

export class SetLayers implements Action {
    readonly type = FoldingActionTypes.SET_LAYERS;
    constructor(public payload: Folding) {}
}

export class SetSpaticlFiltering implements Action {
    readonly type = FoldingActionTypes.SET_SPATICL_FILTERING;
    constructor(public payload: Folding) {}
}

export class SetMeasure implements Action {
    readonly type = FoldingActionTypes.SET_MEASURE;
    constructor(public payload: Folding) {}
}

export class SetGrid implements Action {
    readonly type = FoldingActionTypes.SET_GRID;
    constructor(public payload: Folding) {}
}

export class SetResourceTree implements Action {
    readonly type = FoldingActionTypes.SET_RESOURCE_TREE;
    constructor(public payload: Folding) {}
}

export class SetUpload implements Action {
    readonly type = FoldingActionTypes.SET_UPLOAD;
    constructor(public payload: Folding) {}
}

export type FoldingAction
    = SetBasemaps
    | SetBasemapsThumbnail
    | SetLayers
    | SetSpaticlFiltering
    | SetMeasure
    | SetGrid
    | SetResourceTree
    | SetUpload;